//
//  LoginViewController.m
//  StandardizedProduct
//
//  Created by 宁宁 on 16/6/20.
//  Copyright © 2016年 ym. All rights reserved.
//

#import "LoginViewController.h"

#import "RegisterViewController.h"//注册界面

#import "NSString+Hashing.h"//加密

@interface LoginViewController ()
@property (weak, nonatomic) IBOutlet UITextField *phoneNum;//手机号
@property (weak, nonatomic) IBOutlet UITextField *password;//密码

@end

@implementation LoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.title = @"登录";
    
    
    
}
//下一步(登录)
- (IBAction)next:(id)sender {
    NSLog(@"下一步");
    
    //网络请求
    [self network];
}
//用户使用协议
- (IBAction)Protocol:(id)sender {
    NSLog(@"用户使用协议");
}
//注册商城
- (IBAction)jumpToRegister:(id)sender {
    RegisterViewController *reg = [[RegisterViewController alloc] init];
    [self.navigationController pushViewController:reg animated:YES];
}
//忘记密码
- (IBAction)forgetPassword:(id)sender {
    NSLog(@"忘记密码");
}

- (IBAction)back:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}

//收起键盘
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [_phoneNum resignFirstResponder];
    [_password resignFirstResponder];
}

- (void)network{
    

    
}

//弹出警示框
- (void)showAlert:(NSString *)string{
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:[NSString stringWithFormat:@"%@", string] message:nil preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *cancle = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleCancel handler:nil];
    [alert addAction:cancle];
    [self presentViewController:alert animated:YES completion:nil];
}

@end
